package com.ktgj.customer.domain;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ktgj.common.core.annotation.Excel;
import com.ktgj.common.core.web.domain.BaseEntity;

/**
 * 订单对象 mall_order
 * 
 * @author ruoyi
 * @date 2022-05-30
 */
public class MallOrder extends BaseEntity
{
    public MallOrder() {
        this.orderProductList = new ArrayList<>();
    }

    private static final long serialVersionUID = 1L;

    /** 订单主键 */
    private Long orderId;

    /** 订单编号 */
    @Excel(name = "订单编号")
    private String orderUniqueCode;

    /** 公众号open_id */
    @Excel(name = "公众号open_id")
    private String openId;

    /** $column.columnComment */
    @Excel(name = "公众号open_id")
    private String unionId;

    /** 会员编号 */
    @Excel(name = "会员编号")
    private Long jsjId;

    /** 订单金额 */
    @Excel(name = "订单金额")
    private BigDecimal amount;

    /** 需要支付金额 = amount - coupon_price */
    @Excel(name = "需要支付金额 = amount - coupon_price")
    private BigDecimal payAmount;

    /** 订单状态，0：待支付 10：支付成功 20：支付失败 60：取消订单 */
    @Excel(name = "订单状态，0：待支付 10：支付成功 20：支付失败 60：取消订单")
    private String status;

    /** 微信的支付订单号 */
    @Excel(name = "微信的支付订单号")
    private String transactionId;

    /** 领取的优惠券ID */
    @Excel(name = "领取的优惠券ID")
    private Long wechatCouponId;

    /** 优惠券编号 */
    @Excel(name = "优惠券编号")
    private Long couponId;

    /** 类型 1直减券  2折扣券  */
    @Excel(name = "类型 1直减券  2折扣券 ")
    private Long couponTypeId;

    /** 优惠券使用金额 */
    @Excel(name = "优惠券使用金额")
    private BigDecimal couponPrice;

    /** 权益使用金额 */
    @Excel(name = "权益使用金额")
    private BigDecimal equityPrice;

    /** $column.columnComment */
    @Excel(name = "权益使用金额")
    private Long equityLockId;

    /** 积分价格 */
    @Excel(name = "积分价格")
    private BigDecimal integralPrice;

    /** 积分值 */
    @Excel(name = "积分值")
    private Long integralValue;

    /** 备注 */
    @Excel(name = "备注")
    private String remarks;

    /** 活动编号 */
    @Excel(name = "活动编号")
    private Long activityId;

    /** 活动订单编号(团购时不为空) */
    @Excel(name = "活动订单编号(团购时不为空)")
    private Long activityOrderId;

    /** 0 普通订单  10团单  20秒杀单 30商品组合单 40权益兑换 90混合订单 */
    @Excel(name = "0 普通订单  10团单  20秒杀单 30商品组合单 40权益兑换 90混合订单")
    private Long typeId;

    /** 订单来源 0空铁公众号 1空铁小程序 2金色世纪小程序 3金色世纪公众号 */
    @Excel(name = "订单来源 0空铁公众号 1空铁小程序 2金色世纪小程序 3金色世纪公众号")
    private String orderSourceId;

    /** 支付时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date payTime;

    /** 支付有效时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "支付有效时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date expiredTime;

    /** 0 普通订单 88 充值订单 */
    @Excel(name = "0 普通订单 88 充值订单")
    private Long orderPropertyId;

    /** 删除时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "删除时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date deleteTime;

    /** 快递单号 */
    @Excel(name = "快递单号")
    private String expressOrderNo;

    /** 支付类型 */
    @Excel(name = "支付类型")
    private String payType;

    /** 预留款 */
    @Excel(name = "预留款")
    private BigDecimal reserveMoney;

    /** 订单商品 */
    @Excel(name = "订单商品")
    private List<MallOrderProduct> orderProductList;
    //订单来源渠道
    private String sourceWay;

    public String getSourceWay()
    {
        return sourceWay;
    }

    public void setSourceWay(String sourceWay)
    {
        this.sourceWay = sourceWay;
    }

    public BigDecimal getReserveMoney() {
        return reserveMoney;
    }

    public void setReserveMoney(BigDecimal reserveMoney) {
        this.reserveMoney = reserveMoney;
    }

    public void setOrderId(Long orderId)
    {
        this.orderId = orderId;
    }

    public Long getOrderId() 
    {
        return orderId;
    }
    public void setOrderUniqueCode(String orderUniqueCode) 
    {
        this.orderUniqueCode = orderUniqueCode;
    }

    public String getOrderUniqueCode() 
    {
        return orderUniqueCode;
    }
    public void setOpenId(String openId) 
    {
        this.openId = openId;
    }

    public String getOpenId() 
    {
        return openId;
    }
    public void setUnionId(String unionId) 
    {
        this.unionId = unionId;
    }

    public String getUnionId() 
    {
        return unionId;
    }
    public void setJsjId(Long jsjId) 
    {
        this.jsjId = jsjId;
    }

    public Long getJsjId() 
    {
        return jsjId;
    }
    public void setAmount(BigDecimal amount) 
    {
        this.amount = amount;
    }

    public BigDecimal getAmount() 
    {
        return amount;
    }
    public void setPayAmount(BigDecimal payAmount) 
    {
        this.payAmount = payAmount;
    }

    public BigDecimal getPayAmount() 
    {
        return payAmount;
    }
    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }
    public void setTransactionId(String transactionId) 
    {
        this.transactionId = transactionId;
    }

    public String getTransactionId() 
    {
        return transactionId;
    }
    public void setWechatCouponId(Long wechatCouponId) 
    {
        this.wechatCouponId = wechatCouponId;
    }

    public Long getWechatCouponId() 
    {
        return wechatCouponId;
    }
    public void setCouponId(Long couponId) 
    {
        this.couponId = couponId;
    }

    public Long getCouponId() 
    {
        return couponId;
    }
    public void setCouponTypeId(Long couponTypeId) 
    {
        this.couponTypeId = couponTypeId;
    }

    public Long getCouponTypeId() 
    {
        return couponTypeId;
    }
    public void setCouponPrice(BigDecimal couponPrice) 
    {
        this.couponPrice = couponPrice;
    }

    public BigDecimal getCouponPrice() 
    {
        return couponPrice;
    }
    public void setEquityPrice(BigDecimal equityPrice) 
    {
        this.equityPrice = equityPrice;
    }

    public BigDecimal getEquityPrice() 
    {
        return equityPrice;
    }
    public void setEquityLockId(Long equityLockId) 
    {
        this.equityLockId = equityLockId;
    }

    public Long getEquityLockId() 
    {
        return equityLockId;
    }
    public void setIntegralPrice(BigDecimal integralPrice) 
    {
        this.integralPrice = integralPrice;
    }

    public BigDecimal getIntegralPrice() 
    {
        return integralPrice;
    }
    public void setIntegralValue(Long integralValue) 
    {
        this.integralValue = integralValue;
    }

    public Long getIntegralValue() 
    {
        return integralValue;
    }
    public void setRemarks(String remarks) 
    {
        this.remarks = remarks;
    }

    public String getRemarks() 
    {
        return remarks;
    }
    public void setActivityId(Long activityId) 
    {
        this.activityId = activityId;
    }

    public Long getActivityId() 
    {
        return activityId;
    }
    public void setActivityOrderId(Long activityOrderId) 
    {
        this.activityOrderId = activityOrderId;
    }

    public Long getActivityOrderId() 
    {
        return activityOrderId;
    }
    public void setTypeId(Long typeId) 
    {
        this.typeId = typeId;
    }

    public Long getTypeId() 
    {
        return typeId;
    }
    public void setOrderSourceId(String orderSourceId) 
    {
        this.orderSourceId = orderSourceId;
    }

    public String getOrderSourceId() 
    {
        return orderSourceId;
    }
    public void setPayTime(Date payTime) 
    {
        this.payTime = payTime;
    }

    public Date getPayTime() 
    {
        return payTime;
    }
    public void setExpiredTime(Date expiredTime) 
    {
        this.expiredTime = expiredTime;
    }

    public Date getExpiredTime() 
    {
        return expiredTime;
    }
    public void setOrderPropertyId(Long orderPropertyId) 
    {
        this.orderPropertyId = orderPropertyId;
    }

    public Long getOrderPropertyId() 
    {
        return orderPropertyId;
    }
    public void setDeleteTime(Date deleteTime) 
    {
        this.deleteTime = deleteTime;
    }

    public Date getDeleteTime() 
    {
        return deleteTime;
    }

    public String getExpressOrderNo() {
        return expressOrderNo;
    }

    public void setExpressOrderNo(String expressOrderNo) {
        this.expressOrderNo = expressOrderNo;
    }

    public String getPayType() {
        return payType;
    }

    public void setPayType(String payType) {
        this.payType = payType;
    }

    public List<MallOrderProduct> getOrderProductList() {
        return orderProductList;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("orderId", getOrderId())
            .append("orderUniqueCode", getOrderUniqueCode())
            .append("openId", getOpenId())
            .append("unionId", getUnionId())
            .append("jsjId", getJsjId())
            .append("amount", getAmount())
            .append("payAmount", getPayAmount())
            .append("status", getStatus())
            .append("transactionId", getTransactionId())
            .append("wechatCouponId", getWechatCouponId())
            .append("couponId", getCouponId())
            .append("couponTypeId", getCouponTypeId())
            .append("couponPrice", getCouponPrice())
            .append("equityPrice", getEquityPrice())
            .append("equityLockId", getEquityLockId())
            .append("integralPrice", getIntegralPrice())
            .append("integralValue", getIntegralValue())
            .append("remarks", getRemarks())
            .append("activityId", getActivityId())
            .append("activityOrderId", getActivityOrderId())
            .append("typeId", getTypeId())
            .append("orderSourceId", getOrderSourceId())
            .append("payTime", getPayTime())
            .append("expiredTime", getExpiredTime())
            .append("orderPropertyId", getOrderPropertyId())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("deleteTime", getDeleteTime())
            .toString();
    }
}
